package com.why.Test;

import com.why.client.ProxyClient;
import com.why.client.RpcClient;
import com.why.testapi.HelloWorld;
import com.why.testbean.User;

import java.io.BufferedReader;

public class TestClient {
    public static void main(String[] args) {
       for(int i=0;i<10;i++){
           RpcClient client = new RpcClient(8080, "127.0.0.1");
           ProxyClient proxyClient = new ProxyClient(client);
           HelloWorld proxy = (HelloWorld) proxyClient.getProxy(HelloWorld.class);
           User user = new User("why", Integer.MAX_VALUE);
           proxy.sayHelloWorld(user);

       }
    }
}